<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Nuovo elemento Escursione</title>
	<link rel="stylesheet" type="text/css" href="../styles/style.css" />
</h:head>

<h:body>
<div id="container">
<div id="box">

<header class="banner">
<span id="titoloPagina"> Aggiungi i dati della nuova Escursione </span>
</header>

<div id="externalborder1">
<p:spacer height="40px" />

	<h:form>
	<h:panelGroup  rendered="#{param.noIst}">
			<div id="infoAgg" style="text-align: center;"><h:outputText value="Esiste già un elemento con questi campi"/><br/>
			</div>
			</h:panelGroup>
			<p:spacer height="40px" /> 
		<div id="externalborderChooseBig">
			<h:panelGrid columns="3" id="REG" style="margin-left:231.5px; margin-right:231.5px">
			
				<p:outputLabel for="nome">Nome:</p:outputLabel>
				<p:inputText id="nome" value="#{escursione.elemento.nome}" placeholder="Nome" required="true"/>
				<p:message for="nome" display="icon" />

				<p:outputLabel for="allah">Città:</p:outputLabel>
				<p:inputText id="allah" value="#{escursione.elemento.città}" placeholder="Città" required="true"/>
				<p:message for="allah" display="icon" />
				
				<p:outputLabel for="descrizione">Descrizione:</p:outputLabel>
				<p:inputText id="descrizione" value="#{escursione.elemento.descrizione}" placeholder="Descrizione" required="true"/>
				<p:message for="descrizione" display="icon" />
				
				<p:outputLabel for="multy">Tipologia:</p:outputLabel>
				 <p:selectOneMenu id="multy" value="#{escursione.elemento.multy}">  
		            <f:selectItem itemLabel="Romantico" itemValue="Romantico" />  
		            <f:selectItem itemLabel="Culturale" itemValue="Culturale" />  
		            <f:selectItem itemLabel="Sportivo" itemValue="Sportivo" /> 		             
		            <f:selectItem itemLabel="Relax" itemValue="Relax" />		             
		            <f:selectItem itemLabel="Vegano" itemValue="Vegano" /> 		             
		            <f:selectItem itemLabel="Ladrona" itemValue="Ladrona" />  
        		</p:selectOneMenu>  
				<p:message for="multy" display="icon"/>
										
				
			</h:panelGrid>


		
		</div>

	
	    	     <p:spacer height="40px"/>
	    	     
 <div id="columnBox" style="margin:0px auto; width:70%">
	
	<div id="column1" style="float:left; margin:0; margin-left:107px/*111.5px*/;">
<a id="loginlink" href="creaElemento.xhtml">
					<div class = "button" id = "indietro">
						Indietro
					</div>
				</a>
</div>

<div id="column2" style="float:left; margin:0;/*margin-left:111.5px*/;">
<div class="padder" id="padder">
</div>
</div>

<div id="column3" style="float:left; margin:0;margin-left:/*111.5px*/;">
	<div id="registerButton">
<h:commandLink id="registerlink" update="REG" action="#{escursione.creaEscursione()}">
<div class="button" id="register">
Crea Escursione
</div>
</h:commandLink>
</div>

				</div>
				</div>

<!-- il vecchio era un centerbutton -->

</h:form> 
</div>
</div>	
<div id="push">
</div>
</div>

<div id="footer">
<h:button id="homepage" value="Homepage" outcome="index.xhtml"></h:button>
</div>

</h:body>
</html>